fixing branch detect