fix promise issue