none type fix