Fix: a minor bug in handling return types of specialized methods.