Fix error on cleanup