shell release and cleanup