hack so that scannign works propery with piped input to stdin