fix bug with first run