Fixed issue with collision logic