Some fixes for CMake