Minor code change to initialise class properly