Little known fact here. When you accept a plea bargain you do not accept a sentence as part of that. Often times you agree to plea to lesser chargers which have a lower maximum penalty but you still run the risk of being sentenced to the max.
There is also the chance the judge will give a longer sentence with enhancements. It's possible you will have not been convicted, tried, or even charged for those enhancements. This has been ruled unconstitutional by the Supreme Court of the United States. However that doesn't stop judges from doing it anyway. When you are crushed, broke, and in jail what are ya gonna do, sue?