Corrected constructor and desctrutor