Fix a bug in Converting old inventory DB. Fix bugs in enable/disable tabs but still got problems which need to be improved.