Changed order of operations for rebase command.