fixing collision for min