resolved multiple undefined index / property errors