improved marshaling of id properties