fixing up some typescript stuff