bug fixed: invalid carry flag generation