fix menu layout crash.