try adding register shutdown function