Fix functionencoder to have correct pointers...