Bug fixes after testing with controller.