fix php5.4 compatiable