fix flags type