Righten for php5.2