Updated to install libraries more gracefully