First humble attempt at hacking an RTL fix in JS.
Merge branch 'RTL_fixes'
oops, tested the wrong changes\!