fix rows and cols