Fix redirect bug in IE

This is associated with #46