Fixing missing done function -- switch to emit