restore options and hooks after knit