Fix for ENUM_AS_BOOL problem reported by Coverity