fixed hanging at program start