Fixed row counting errors and typos