fix minor issue and implement temporary patch for sudo permission issue