Fixed passing of 'next()' to avoid endless loop on 404