fix bug with inherited tostring