Fix for multithreading issues in FSM and support for Json content type