small changes

changes for c compatiblity in for loop, should work fine