Promises fix

Screwed up my other branch, let's try this again.