Fixed middleware not returning generator function
Merge pull request #1 from Ntran013/master

Fixed middleware not returning generator function