fix php errors