Improved attribute hooks