Fix a bug in the console event handler class