changed max number of flags