fix some ordering issue