Fixed a bug with collision