fixes sort bug in comm command