added an upgrade window WIP
fixed a merge error and fixed ArrayIndexOutOfBoundsException's that were being thrown