Fix installer

* Fix run "update" in installer before CMS is installed
* Fix small database exception