Better alert logic onload