minor tweaks to prevent PHP warnings