Fixed the JSON access in the create marker function