cast int back to enum after bitwise operations so clang based compiler will not stop on error.