Fix incorrect json being send