Add lockBuffer to render parallel (but not work yet)
Fix wrong rendering.