output fix to resolve 500 internal error-json library issue