fixes shutdown exception