Fixed bug in YamlSerializer