wax cracking round edge of container glass anyone know why?

Does anyone know how to prevent soy wax cracking round the edges on the top of the wax when used in glass containers?
Is there anyway of rectifying it once it has happened ?
Any advice appreciated