Fixed bug related to curve file reading