minor js change waiting dom ready