Fixes #1409. No need to use javascript here.
Merge pull request #1412 from xiaohutai/feature/bolt2

Fixes #1409. No need to use javascript here.