Fix "implicit conversion" warnings