fixing issue with non json bodies

trying to fix #236