Odd cmake behaviour correction