Fixed range bug in output argument