fixed some reset/dispose problems