Fixed build and updated to latest libraries