fix wrong packages and type erasure