Fix CMake build bug