Added garbage colection checks in init and assign