Fixed bugs preventing types from being found.