Fix collision logic