Fixed #46. Timeout now works correctly.