fixed a bug in the curl class.