Implemented the buffer for windows resizing