Fix validation of hooks and sources.