Fixed the 'bug', script no longer needs to be run twice to complete all assignments desired.