Fixing async issue