removing the bug of javascript compatibility