Added small bugfixes