fix warnings and only allow cheats in play mode