Fixing php errors.