bugfix: unknown variable $output