Removing emit that was causing an unhandled exception