fix issues with issue 605 and 538 with limit > 25