Made some small bugfixes.