Fix the attach behavior with -i