Added from_yaml method fixed