Changed to execute query asynchronously.