Loop variable increment added (thanks carst)