fixed outputs assignment

fixes #719