-Fixed but in template helpers where a copy of component dimensions was modified instead of the passed value
-added missing error message to writeimage