Changes made in order to make cookbook switching work correctly.