Moved to separate thread.