Undo for changing images implemented