Changed condition operator in for loop. Fixes #1