Added some guard code around the resettable methods so that we don't have a memory leak