Refs #273 Fixed possible memory leak