fixed dst inside loop

This fixes examples 08,10 and 11 on iOS.
Merge pull request #81 from attilaz/master

fixed dst inside loop