Fix last_cmd_type

Change-Id: I0b92b474c50d923ecf42646934d6a6319cd2a6bf