Fix php errors