fixed last_command