fix several static variable declaration that prevent multithread rendering