Added check for getRowSum