program crashed when freq was entered with comma as decimal separator - fixed