Fixed bug where backslash (\) would not be escaped in output