Fix problems in CMakeLists.txt