fix some object release issues