Fixed execution so it returns to main program after process completes.