Fixed Update Goal bug

Fixed bug where the wrong goal would be updated when there were
unviewed, completed goals.