fixes service subscription and removes trailing spaces