Slight tweak to flag generator. Issue #216