some details in javascript.
This and previous commits fix #38