Fixed redirect bug. Close #112.