temporary buffer fix, causes double buffering though