fixed null reference exception on image click