added attributeChanged case

Just added attributeChanged...just in case.

Also removed a var declaration that was lingering there.

cheers!