Fixing path and for-loop operation.