Fix row and column indecies