Smarter bootstrap 2 vs. 3 handling