fix thread-unsafe lazy initialization