Extended fix for the RSA boundary check