fixed flat dao issues