fix nonetype