Fix for infinite loop on redirect. (#16)