Fix bug preventing upgrade command from working.