Fix bug when commandResult is null