Bug fixes and redirect tweaks