deshake: fix off by 2 error