Fixing up some difficulties encountered with the sliding window.