fixed on-first-run errors