fix service declaration after using