Do not define as a static there. Was resulting in undefined behavior.