fix state in js, update controller
fix string 2 json