Fixed external inner procedure generation