Fixed escape/unescape issue in metadata from DB, basically due to to_json call