Change flag and lvl check from bitwise & to &&