Add hooks for #315