Fixed nullreference.