Added security check for change branch