fixed a bug of terrain update