Fix restart behaviour