buf fixed in select and select-auto