fixed bug with duplicate type erasure