Merged UI thread to main thread, still buggy