cleanup for thunks