Remove unused variable after buffer change