Fix PHP Notice errors