More fixes for update/upgrade functions.