BUG: add metadata didn't fallback to json

fixes #567