improved collision detection algorithm
sound bugfix