Main null poinjter fix