fix option menu bug causing the nonetype error