Fix #16, use correct variable in hook.