avoid undefined values when grabbing HTML of current activity