made updates to the daemon so that it doesn't crash