Fix some bugs by changing GethashCode to a polite exception handler class.