gamelogic and PEP fixes