Fixed null menu bug

Finally tracked down that nasty null menu bug and fixed it.