fix to service constructor