self variable leaked into global scope due to lack of var.  (good spot @andymantell)