Fix error callback when string contain single quote.