old patches, new library, make it compile again! not tested!