Bug fix for hooks

Turns out `Promise.map()` runs on the items in the array in an unpredictable order. Changed to `Promise.each()` instead for serial execution in order of array items.