Fixed some errors introduced with the refactoring of StatementExecutor.