Update dependencies to latest versions and fix incorrect usages