Bugfix sql update script