[fix] Typo, used [] instead of ()
[fix] Cache can be undef
[fix] Correctly iterate the middleware
[fix] Correctly save the page to variable
[fix] Only free page's when we have one
[fix] Pass in the correct type when we got pageid in the querystring
[fix] Add useful debug information