fix triple buffer