fix for bug in php of an earlier version