diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 670507e..e256115 100755
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -1387,6 +1387,8 @@
         if (filterRepresentation.getFilterType() == FilterWatermarkRepresentation.TYPE_WATERMARK_CATEGORY) {
             return;
         }
+        boolean addToHistory = filterRepresentation.getFilterType()
+                != FilterWatermarkRepresentation.TYPE_WATERMARK;
         if (filterRepresentation instanceof FilterUserPresetRepresentation
                 || filterRepresentation instanceof FilterRotateRepresentation
                 || filterRepresentation instanceof FilterMirrorRepresentation) {
@@ -1411,7 +1413,7 @@
                 }
             }
         }
-        MasterImage.getImage().setPreset(copy, filterRepresentation, true);
+        MasterImage.getImage().setPreset(copy, filterRepresentation, addToHistory);
         MasterImage.getImage().setCurrentFilterRepresentation(filterRepresentation);
     }
 
@@ -1470,6 +1472,11 @@
             }
         }
         if (representation.getFilterType() == FilterRepresentation.TYPE_WATERMARK) {
+            if (MasterImage.getImage().getCurrentFilterRepresentation() != null
+                    && representation.getSerializationName().equals(MasterImage.getImage()
+                    .getCurrentFilterRepresentation().getSerializationName())) {
+                return;
+            }
             showWaterMark(representation);
         }
         if (TrueScannerActs.SERIALIZATION_NAME.equals(representation.getSerializationName())) {
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
index b33491f..dae2de8 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
@@ -17,6 +17,7 @@
 package com.android.gallery3d.filtershow.filters;
 
 import android.content.res.Resources;
+import android.text.TextUtils;
 import android.util.JsonReader;
 import android.util.JsonWriter;
 import android.util.Log;
@@ -67,6 +68,10 @@
     public FilterRepresentation copy(){
         FilterRepresentation representation = new FilterRepresentation(mName);
         representation.useParametersFrom(this);
+        if (getFilterType() == TYPE_WATERMARK) {
+            representation.setSerializationName(getSerializationName());
+            representation.setFilterType(TYPE_WATERMARK);
+        }
         return representation;
     }
 
diff --git a/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java b/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java
index 484d8f2..2bd1216 100644
--- a/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java
+++ b/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java
@@ -444,6 +444,20 @@
             if (!replaced && !isNonePresetFilter(representation)) {
                 mFilters.add(representation);
             }
+        } else if (representation.getFilterType() == FilterRepresentation.TYPE_WATERMARK) {
+            boolean replaced = false;
+            for (int i = 0; i < mFilters.size(); i++) {
+                FilterRepresentation current = mFilters.elementAt(i);
+                if (current.getFilterType() == FilterRepresentation.TYPE_WATERMARK) {
+                    mFilters.remove(i);
+                    replaced = true;
+                    mFilters.add(i, representation);
+                    break;
+                }
+            }
+            if (!replaced) {
+                mFilters.add(representation);
+            }
         } else {
             mFilters.add(representation);
         }
