Use updated type hashing
Fix buffer overrun
Fix compilation issue