[Console] fix cleanup code