dirty string hack to remove duplicated union types. will clean up later.