Fix some async gulp task bugs.