correction in line end handling after return in function inside nestedblocks