Fixing metadata saving and better support for strange config