Fixed errors. Moved off of main UI thread.