correct null ref exception