Fixed check for no attributes