Fixed php5.4 bug