Fixed auth null object issue