Added missing flush() in MetadataHandler.
Merge pull request #126 from acidmoose/master

Missing flush