fix compatibility issue with php5.3