Fixed comparator function for show command