sorting layers fix