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

Fixed two problems.