Fixed getting branch by mask, comments