fix first run bug