Fix async mysql queries