Fix service installation issues and other bugs