php5.4 correctness fix