be more defensive in getting all attributes