#49 Added changing of flags