Fix typo and bugs

sudo was in interactive mode and blocking