fixing attr writer for other attributes as well