fix clicking (reverse loops order)
Merge pull request #2 from mlsteele/master

Fix clicking