finded and fixed sigsegv bug. But diffie try to beautify this code