Code rollback to previous state