fixed buggy js in chrome