Fixed some bugs in GameplayManager.