Fix to issue #1367

Fixing invalid yaml 

Solution based on https://github.com/rails/rails/commit/dc94d813e2d158c5a284212c5d8146c677dbb877