onload bug fix attempt