Fix JSON parsing bug in firefox