fixed a bug in FastMap