fix hook overriding in action

This PR adds tests and fix for issue #86.