Fix invalid last command status