Fixed some bugs on cmakefiles and on Player.cpp