Fix for flag update