refixed the gotoimmediate to be run on a separate thread.