fixed problem with ordering