Fix makePath crash due to variable mixup