Fix collision check