fixed Dom load timing issues