fixing attr handeling and a few tests