Corrected branch logic in MEM stage