correct platform conditionals in .onLoad and setThreadOptions