Added successful redirect, fixed a bug