pass data to afterhooks, too

see #385