fixed the exception "type"