Some quick bugfixes.