fix buffer overflow bug in 'r' command