bugs fixed in prediction