fix: flags detecting