test beq and fix it