Fix some errors due to ordering.