mask x (and z, k to get the right result) instead of r. fixes #38