Changed -1^mask to ~mask