fix for #38 and #19 upgraded third-party libs
merge conflict