fixed a bug in classification