Tweaks to restore controller to properly update database