fixed bug related to running fx UI not on fx thread