fix Statement mode check in getFetchFunction