Made json data function populate properly.