Fix memory corruption
Fix memory corruption

Quick fix that should be improved in the future.

nabilbendafi/haka,lcheylus/haka,nabilbendafi/haka,Wingless-Archangel/haka,LubyRuffy/haka,haka-security/haka,lcheylus/haka,lcheylus/haka,haka-security/haka,nabilbendafi/haka,Wingless-Archangel/haka,haka-security/haka,LubyRuffy/haka