fix menu collapse bugs