Fixed an issue where the done callback was not getting called if a promise was not returned.