fixed clearing out problem