uncomment suspicious section; seems that print_images has some js code that is executed on page load... fixed this.