Fixed broken subtype detection.