Fixed a bug in the gameplay manager