Set flags even for error condition