fixed flag checking