fixing stored ordering