fixed menu logic errors.