Added lockMask option.