HOPKINS: Fix error in loop conditions. Thanks Eriktorbjorn for noticing