Fixed unavailable promise
intermediate debugging