Issue 2402 1.9.5 upgrade fails

Fixed the upgrading from 1.9.5 (hope I did not break other updating)