solved bug with multiple output parameters