Fix implicit conversion warnings