bug fix - run as daemon