Fixed requirements, added modified check for flag generation.