Removed bugs from the CMake scripts.