It happens, that is because terraforming improvements have quality level corresponding to to quality of unconverted tile and if there is no tile they can convert that improvement is effectively wasted. I can't give you exact details since I never look at those numbers closely and only thing I can recommend is to use terraforming in order you get them in tech tree to minimalise this effect. This is actually a problem on big planets like 15+, I don't remember having it on smaller ones.