1) moved emit('end') to 'done'
2) changed handleResults()