fixed sonic sensor..

and closes a few bugs