deleted the var and modify log prevMaigc's state tramform logic