Fixed issues with buttons null by checking if controller is active