fixed some gamelogic to make client and server work together