add fix for php5.2