Fixed some upgrade stuff