Fix async error. Variable declaration on right scope.