fixed a bug in menu clicking