more debug messages, fixed serious bug which caused duplicate subscription to events