I think it has something to do with either combining the objects or checking the direction of the normals. I am sure this has come up plenty of times before - just do a search on SM and you will find some previous threads on this problem.