bugfix for types erasure