fixed buffer management
Merge changes from Zach and update wautofocus submodule.