More papercuts

* fix log viewer (again)
* switching repos clears selected and pinned jobs
* fixed exception when resultset is zero length