improved blas lapack check