added workaround to support PHP 5.6