Fix PHP errors