fix service constructor to prevent crash on startup