Fixed bug when receiving json