Minor bug fix in collision detecting.
Merge origin/master
Minor bug fix in collision detecting.