Correcting error of assigning data received to div