Fixed bugs in gamecontroller