Fixed redirect bug in IE/Safari, closes #25