Updated Javascript loading problem