Fixed some auto complete issues and added debug messages on events