Fix secret length check