url optimization and mode fixing