Fix small problem with Hook, still lack some unit testing