Error correction groups coded in, but bugged up. Oops. Also fixed an issue with automatic mask selection