fixed dst inside loop

This fixes examples 08,10 and 11 on iOS.