Attempted fix of gameplay loop