datasource open/close fix