trying to fix issue with flags