Finally fixed generic hooks, Closes #9