nonetype fix