Fixing small bug in object convert