Make the flag register work