some ordering fixes