bugfix in publish images (still has problems with tabarray 0 indexing.. not sure i understand this problem)