do not crash on invalid json
small clean up