fix bug where img id tag was not set and check for cell existence in trash