fixed promise issuse.