Fix template url routing issue