Fix the error properly -- we should mask off unrelated bits