fix to hooksFromAttributes