Fix specs and implementations for attribute changed and events