Fix parameter references in non-procedures