   ([^long n ^long k lower? diag-unit?]
    (let [diag-pad (if diag-unit? -1 0)]
      (if lower?
-       (band-region n n (min (max 0 k) (dec n)) diag-pad)
-       (band-region n n diag-pad (min (max 0 k) (dec n)))))))
+       (square-band-region n (min (max 0 k) (max 0 (dec n))) diag-pad lower?)
+       (square-band-region n diag-pad (min (max 0 k) (max 0 (dec n))) lower?)))))
 
 (defn sb-region
   ([^long n ^long k lower?]
    (if lower?
-     (band-region n n (min (max 0 k) (dec n)) 0)
-     (band-region n n 0 (min (max 0 k) (dec n))))))
+     (square-band-region n (min (max 0 k) (max 0 (dec n))) 0 lower?)
+     (square-band-region n 0 (min (max 0 k) (max 0 (dec n))) lower?))))
 
 (deftype GERegion [^long m ^long n]
   Object

     :kl (.kl r)
     :ku (.ku r)
     :surface (.surface r)
     :uplo (if (.isLower r) :lower :upper)
     :diag (if (.isDiagUnit r) :unit :non-unit)})
  Region
  (accessible [_ _ _]

  ([^long n ^Boolean lower? ^Boolean diag-unit?]
   (let [diag-pad (if diag-unit? -1 0)]
     (if lower?
       (square-band-region n (max 0 (dec n)) diag-pad lower?)
       (square-band-region n diag-pad (max 0 (dec n)) lower?))))
  ([^long n lower?]
   (band-region n lower? false)))

