mostly double buffer fixes