Fixed PHP compatibility issue