Fixed java.lang.IllegalStateException: Attempt to call defer when toolkit not running once JavaFx is being terminated