Fix static_initializer, add unit test