Fixing some clang implicit enum conversion warnings