Changed middleware name key from 'middlewareName' to 'name'.