workaround for https://bugs.php.net/bug.php?id=66014