changed buffer typeduring clean up