fixed double buffering