Small changes for onload