--- 
+++ 
@@ -29,7 +29,7 @@
         for (Iterator<String> it = attributes.keySet().iterator(); it.hasNext(); ) {
             String attrKey = it.next();
             if (attrKey.equalsIgnoreCase(key))
-                attributes.remove(attrKey);
+                                it.remove();
         }
     }
 