fixed issue where declared types did not properly have their events and functions converted