fixed async coding error