Fix bug reading yaml and test