total gross break fix for img.length.  temp fixes #9