Added timeout to menu collection code.