Hi, Why aren't you using the NewPing library.
http://playground.arduino.cc/Code/NewPing
Fixes a lot of probems.
Tom...