debugging ImageHandler loop problem