Bug fixes in bundling