Updated to add option to support unmasking long values