fixed a curl bug when missing data.
added support for spaces in curls