Promise chaining fix.