fixed threading issue with onDestroy()"