Make promise selection logic clearer
Merge pull request #1575 from spicyj/dispatch-index

Make promise selection logic clearer