fix undefined local variable or method `stdin'