fix -i flag pass