Fix bug in rollback order of execution