Fix for thread-safe PHP