bugfix.

Fix bug when first run.