Fix some bugs with loading libsvm files