fixed a bug in topic matcher