fixing php errors