Changed image onload to use this