fixed MARMOTTA-279 (invalid query when trying to fix inconsistencies) and MARMOTTA-278 (denial of service by garbage collector)