Removed unnecessary code - copied, and then loop creates a copy

Removed unnecessary code - copied, and then loop creates a copy, changing the copy after the password has already been set to null.