TST/BUG: fixed references to class attributes