fixed #75 with js may need to test over