Cleandb fix, subprocess out fix