Delete khash_mask macro

And fix expression to more simple and readable.