add some explicit casts