change maxExpandDepth from default value (2) to 9.
fix a bug: it runs into infinite loop when calculate the coordinates.