fix onload issue