Add upgrade code to 1.6
version change : 1.6 (160)
Fix upgrade bugs. Hope this is the last fix.