Removes config.threadsafe in production environment: fixes #3939