* Bugfixed upgrade script