Fixed small error in checking existent attributes.