Added ensureStatementsReturned to handle the case where zero statements are returned but a more link is present
Fixed typos in ensureStatementReturned