Fix flags not being set properly in the CTF creation process