added "remote_lock_branch" and fixed some issues