fix for rtprint

the original patch is proposed in https://github.com/gbiggs/rtshell/pull/15, but not merged for long time