Comparator not using memory ouput