Fix collision bug. Fixes #1