Fixed array slice bug and added regex route type.