Menu and time bug

When I open the game menu (left-click), the counter stops.
Then open the main menu (esc) - menu of the game stayed open.
I close the main menu (with the continue button or the X button) and the counter starts, and the game menu is will remain open.