cleanups in backend