fixed #295. some problem in the JS now