kill old viewer before creating new one