Changed bounds of for-loop