fixing redirection bug in admin panel