Workaround for bug https://bugs.php.net/bug.php?id=65992