Fix non ui thread