fix to consider branches