fix paths, fix shutdown