js fix #4629