use tmp rather then negative id for double buffering