Fixes some parts of fetchStatements.