Some bugfixes and a test case for the yaml reader