Fixed unit tests, and some cleanup for propagation training last error.