Edited ImageStack to have an emptystackexception and make the drop redo item option work