correct clean up order