Add a few explicit casts to silence warnings concerning overloading ambiguities