Changes made to fix json parsing errors when posting events