Fixed stdin issue