Fixed issue which would prevent game loop from looping