Fix some cmake and print problems