Does this simple check solve the issue? Why is Tmax different on different platforms?