Fix for Procedure Outputs

Needs testing + Look @ Re-Factor code