Fixed remove_thread_handle.
Terminate program on userspace exception.
Test divide-by-zero handling.