fixed some ordering stuff