Bug fixes and libraries upgrades