add code fix hide menu if no extra and calculate directly in this case