Delete menu works properly and input stream is fixed