Made rebase safer on OS X