fixed menu closing issue