Minor fixes on unsupervised learning