DataPort code fixes