fixed the null pointer exception on json