bug fix for attach (wasn't counting down the latch properly), and jshint fixes
diff --git a/client/lib/rewriter.js b/client/lib/rewriter.js
index 762a51a..f79218f 100644
--- a/client/lib/rewriter.js
+++ b/client/lib/rewriter.js
@@ -388,9 +388,11 @@
 			    console.log('   Creating rule clone'.green, otherEntityWithDetails.name);
 			    RuleRewriter.rewrite(ow, otherEntityWithDetails, entity, entityNamespace, names)
 				.then(countDown, errorWhile('creating rule clone', countDown));
+			} else {
+			    countDown();
 			}
 		    }).then(ok(next)).catch(next);
-		});
+		}).catch(next);
 	    });
 	}; /* end of doAttach */
 	
@@ -526,7 +528,7 @@
     var next = args.shift();
     var action = args.shift();
 
-    if (!action || action === '-p' || action == 'invoke') {
+    if (!action || action === '-p' || action === 'invoke') {
 	//
 	// user did not provide an action
 	//