fix bug with ordering on library page