fixed upgrade bug
fixed js error