fixed a bug introduced when infinite values in dataset (simply convert to NAs for now so they are removed)