fixed return promise issue