fixes #314
fix nonetype