Fixing onload action