only flip buffer when altered