Fix static initialization and warning