Fixed php5.4 support