Demo code n fixes