fixes to php notices