fixed #8, json parse on undefined