Improved check bits generation