Pull in new round of changes from the full version of lib