fixes to onload