fixed errornous type retrieval