fixed a onload bug