Fixed several bugs in game