Zorder fix

1. set z order after reorder
2. fix a warning