Fixed errors in unitests
Cleanup restarting exportd