Thank you for your replay but as I use the strict pragma and I wont disable it your solution will not work.
But nevertheless I guess you are right. Rungekutta uses the sub several times and local is not the right thing to use in this case.
What else could you suggest in order to make the inner subs using the vars from the outer one.