fixing some upgrade stuff