Fix implicit double conversion warning