fix for old php version