Fixed null exception in CommandService.cs