Let's Make Robots!

Arduino Bot has a mind of its own??

Hello,
    My bot seems to have a mind of its own. code seems to be working but at times it react to an object thats not there??? its set to find a better path after coming within 30 cm of an object but sometimes theres nothing there and it looks for a better path? can this be from the ping returning false values, or i think it might be from the 9v battery draining quickly. Any ideas?? Thanks oh, I'm using Arduiino Duemilanove. Code is attached