Few small bugfixes