fixing crazy nonetype bug thanks to ryan