fixed types plugin not preserving type or ID - close #508