Fix row/column bug.
Used the reference code in gaussian_blur().