Fix a bug with saving the user's screen options preferences
Fixes to table creation and upgrade functions