Fixed flags changing program behavior