A couple of fixes

I liked your implementation the best and wanted to fix some bugs that I ran into.  Also liked the tasks loop and wanted that for eventlisteners for superlance so I copied it.