fixed segfault issue in lw when stdin is a pipe with no data