The last(?) bunch of small bugfixes

Another bunch of small bugfixes. No now functionality or changes here, just some bugfixes that were needed to have a stock probind instance up and running.