Multiple middleware support and fix import error at template tag