Fixed potential errors with controller adapter.