fix bug: broken references on types