fixed non-terminating loop with namespacing events bug