corrected Beq glitch