replaced redirect(0) to redirect()