Improve walk when lagging
Fix compile error for win32