SetCanon method fixed

The flag was being set in the wrong variable (iflag instead of lflag); this patch fixes it.