fixed on-start bug