fix issue #336, #339 '3x' and '3r'
Merge pull request #343 from pebble8888/dotx

fix issue #336, #339 '3x' and '3r'