fixed bug when starting