Repair of the NullreferrenceException