Fixed tests for the flag setting part