Improve saving buffer condition