Bugfix: Removed two memory leaks
Added default values