Fixing types in zorder