fix header and images onload bugs