bugfix: check for attribute existence