Fix NullRefrenceException