prevent exception on max if only one flag is passed