fixing flags