Some fixes to make gort more friendly to being a system service