fixed bug in collision behavior.