fix a few implicit conversion warnings