Seems to be working now. Need to run on test data.