Fix more problems due to stdin being a file