Minor bugfixes/corrections