fix redirect on then callback. fix #1