Promise bug fix (call resolver once)