Fixed fatal error

This fixes a fatal issue caused by the use of serialize with strings that contain double quotes.