Fixed typo: the flags are defined in magic (or magic.flags) not magic.api