Fix flex check further