fix a bug while startup