Error in the EndofTurnProcedures