when i am deleting the last buffer of the window, this error pops up: 