Fixed bug causing 301s to fail