fixed onload issue