fixed crashing at start