Fixed some upgrade/ui bugs