fixed a type
use order by clause for layer constraints