Wrapped autload hooks in middlewares to prevent misfiring