Fixed double serialization when using object type

Signed-off-by: rpgmaker <olamide.bakre@gmail.com>