fix attributes, remove debug code