Fixed 'segment fault' error at completion.