fixed for old php