Fix bug when completion obj is null.