fixed reading bool flags