Fix check_output for 2.6