Improve cross thread selection
minor bug fixes