fix bad parsing and mongodb backend