Fix PHP compatibility issue