Fix error for non-tracking branches