bug in resolve polymorphic type solved