bug fix in getbasis.