fixed bug in hash, put extra logs into defines