fixed bug where program crashed if there are no types, variables, or functions