Fixes bug with console emit.