Fix panic when no master branch