make preview work again after search/new template change