adding compatibiltiy with php5.3.2