fixed memory leak when using of default constructors