fix php compatibility issue