fixed last_act bug