fix bug with window sizes not divisible by the word size
windows should be at least window-sized, but there are remaining issues