gets rid of empty flag