make sure this is executed on the UI thread.