some fixes for attribute handling