PHP5.2 fix