Fixed incorrect comparator and removed dead code

USERGRID-1768