Make maintenance middlware optional