Issue #2: Fails loop with value zero