Fixed integer overflow problems.

The event would overflow when requesting a 60 minute timeout.
cMojangAPI: Fixed a possible problem with thread termination order.