Fix large-object related bugs