clean up resolver casts to handle both old and new libraries