Fix implicit unit conversion