Fixed bug where metadata was added to output object