hexy ping interaction??

I was trying to use the ping command in my project and when I use it alone, it gives the proper distance each read, but when I use a routine that moves the servos (e.g. rotate hips to starting position) I get at least 1 zero distance reading. I have worked around it with a while loop eliminating any zeros, but I wuld like to know why and if it can be fixed more elegantly.
Does it need a delay? Any details would be appreciated.
docbill