synchronize finish() with AsyncTask