Merge "fix a bug when reallocating a window's buffers is needed" into kraken