Attempt to fix intermittent failures in testing

(and Promises :)