fix asyncronous  issue