More safety in buffer operations